<template>
  <div>
    <van-sidebar class="wid" v-for="(v, index) in list" :key="index">
      <van-sidebar-item class="it" :title="v.title" />
      <!-- <van-sidebar-item class="it" title="老用户专享" />
      <van-sidebar-item class="it" title="手机" />
      <van-sidebar-item class="it" title="笔记本" />
      <van-sidebar-item class="it" title="平板" />
      <van-sidebar-item class="it" title="智能穿戴" />
      <van-sidebar-item class="it" title="智慧屏" />
      <van-sidebar-item class="it" title="路由" />
      <van-sidebar-item class="it" title="耳机音箱" />
      <van-sidebar-item class="it" title="生态产品" />
      <van-sidebar-item class="it" title="配件" /> -->
    </van-sidebar>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
    };
  },
  mounted() {
    this.$http({
      url: "http://localhost:3000/slidebar",
      method: "get",
    }).then((res) => {
      this.list = res.data;
    });
  },
};
</script>

<style lang="scss" scoped>
.wid {
  width: 6.25rem;
}
.it {
  height: 3.187rem;
}
</style>